package edu.ynu.se.xiecheng.achitectureclass.Demo1.dao;

import edu.ynu.se.xiecheng.achitectureclass.Demo1.entity.DeviceData;
import edu.ynu.se.xiecheng.achitectureclass.common.dao.LogicDAO;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DeviceDataDao extends LogicDAO<DeviceData, Long> {
    @Query("SELECT d FROM DeviceData d WHERE d.class = :dataType")
    List<DeviceData> findByDataType(@Param("dataType") String dataType);

}
